package com.hongdee.crm.workorder.entity;

import com.hongdee.annotation.ExcelData;
import com.hongdee.base.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 名  称:TCrmCarWorkOrder
 * 类  型: class
 * 描  述:
 * 路  径:com.hongdee.crm.workorder.entity.TCrmCarWorkOrder;
 * 作  者: 术洪超
 * 日  期:2017-02-15 09:25
 */

@Entity
@Table(name = "T_CRM_CAR_WORKORDER")
public class TCrmCarWorkOrder extends BaseEntity {

    //工单状态
    @ExcelData("工单状态")
    @Column(name = "order_status", length = 20, columnDefinition = "VARCHAR(20) COMMENT '工单状态'")
    private String orderStatus;

    //开单日期
    @ExcelData("开单日期")
    @Column(name = "open_date", length = 22, columnDefinition = "BIGINT COMMENT '开单日期'")
    private Long openDate;

    //工单号
    @ExcelData("工单号")
    @Column(name = "order_num", length = 32, columnDefinition = "VARCHAR(32) COMMENT '工单号'")
    private String orderNum;

    //工单类型
    @ExcelData("工单类型")
    @Column(name = "type", length = 32, columnDefinition = "VARCHAR(32) COMMENT '工单类型'")
    private String type;

    //接待员
    @ExcelData("接待员")
    @Column(name = "receptor", length = 32, columnDefinition = "VARCHAR(32) COMMENT '接待员'")
    private String receptor;

    //车牌号
    @ExcelData("车牌号")
    @Column(name = "plate_num", length = 10, columnDefinition = "VARCHAR(10) COMMENT '车牌号'")
    private String plateNum;

    //品牌
    @ExcelData("品牌")
    @Column(name = "brand", length = 32, columnDefinition = "VARCHAR(32) COMMENT '品牌'")
    private String brand;

    //车系
    @ExcelData("车系")
    @Column(name = "series", length = 32, columnDefinition = "VARCHAR(32) COMMENT '车系'")
    private String series;

    //车型
    @ExcelData("车型")
    @Column(name = "model", length = 32, columnDefinition = "VARCHAR(32) COMMENT '车型'")
    private String model;

    //维修类别
    @ExcelData("维修类别")
    @Column(name = "maintain_type", length = 32, columnDefinition = "VARCHAR(32) COMMENT '维修类别'")
    private String maintainType;

    //是否完工
    @ExcelData("完工验收")
    @Column(name = "is_finished", length = 32, columnDefinition = "VARCHAR(32) COMMENT '是否完工'")
    private String isFinished;

    //维修金额
    @ExcelData("维修金额")
    @Column(name = "maintain_amount", length = 32, columnDefinition = "VARCHAR(32) COMMENT '维修金额'")
    private String maintainAmount;

    //结算金额
    @ExcelData("结算金额")
    @Column(name = "balance_amount", length = 32, columnDefinition = "VARCHAR(32) COMMENT '结算金额'")
    private String balanceAmount;

    //收款金额
    @ExcelData("收款金额")
    @Column(name = "receive_amount", length = 32, columnDefinition = "VARCHAR(32) COMMENT '收款金额'")
    private String receiveAmount;

    //行驶里程
    @ExcelData("出厂里程")
    @Column(name = "run_mile", length = 32, columnDefinition = "VARCHAR(32) COMMENT '出厂里程'")
    private String runMile;

    //车主
    @ExcelData("车主")
    @Column(name = "owner", length = 256, columnDefinition = "VARCHAR(256) COMMENT '车主'")
    private String owner;

    //送修人
    @ExcelData("送修人手机")
    @Column(name = "sender_tel", length = 256, columnDefinition = "VARCHAR(256) COMMENT '送修人电话'")
    private String senderTel;

    //送修人
    @ExcelData("送修人")
    @Column(name = "sender", length = 32, columnDefinition = "VARCHAR(32) COMMENT '送修人'")
    private String sender;

    //预计交车日期
    @ExcelData("预计交车日期")
    @Column(name = "expect_date", length = 22, columnDefinition = "BIGINT COMMENT '预计交车日期'")
    private Long expectDate;

    //完工日期
    @ExcelData("完工日期")
    @Column(name = "finish_date", length = 22, columnDefinition = "BIGINT COMMENT '完工日期'")
    private Long finishDate;

    //结算日期
    @ExcelData("结算日期")
    @Column(name = "balance_date", length = 22, columnDefinition = "BIGINT COMMENT '结算日期'")
    private Long balanceDate;

    //结清日期
    @ExcelData("结清日期")
    @Column(name = "clear_date", length = 22, columnDefinition = "BIGINT COMMENT '结清日期'")
    private Long clearDate;

    //交车日期
    @ExcelData("交车日期")
    @Column(name = "send_car_date", length = 22, columnDefinition = "BIGINT COMMENT '交车日期'")
    private Long sendCarDate;

    //车主代码
    @ExcelData("车主编号")
    @Column(name = "user_code", length = 32, columnDefinition = "VARCHAR(32) COMMENT '车主代码'")
    private String userCode;

    //索赔单号
    @ExcelData("索赔单号")
    @Column(name = "demand_num", length = 32, columnDefinition = "VARCHAR(32) COMMENT '索赔单号'")
    private String demandNum;

    //试车员
    @ExcelData("试车员")
    @Column(name = "test_operator", length = 32, columnDefinition = "VARCHAR(32) COMMENT '试车员'")
    private String testOperator;

    //维修类型ID
    @Column(name = "maintaintype_id", length = 32, columnDefinition = "VARCHAR(32) COMMENT '维修类型ID'")
    private String maintaintypeId;

    //车辆ID
    @Column(name = "car_id", length = 32, columnDefinition = "VARCHAR(32) COMMENT '车辆ID'")
    private String carId;

    //SAID
    @Column(name = "sa_id", length = 32, columnDefinition = "VARCHAR(32) COMMENT 'SAID'")
    private String saId;

    //SA所在组ID
    @Column(name = "sa_group_id", length = 32, columnDefinition = "VARCHAR(32) COMMENT 'SA所在组ID'")
    private String saGroupId;

    //平均保养里程
    @Column(name = "avg_mile", length = 32, columnDefinition = "VARCHAR(32) COMMENT '平均保养里程'")
    private String avgMile;

    //车架号
    @ExcelData("车架号")
    @Column(name = "vin", length = 32, columnDefinition = "VARCHAR(32) COMMENT '车架号'")
    private String vin;

    //车龄
    @ExcelData("车龄")
    @Column(name = "car_age", length = 32, columnDefinition = "VARCHAR(32) COMMENT '车龄'")
    private String carAge;

    //商品名称
    @ExcelData("商品名称")
    @Column(name = "product_name", length = 64, columnDefinition = "VARCHAR(64) COMMENT '商品名称'")
    private String productName;

    @Column(name = "interval_mile", length = 32, columnDefinition = "VARCHAR(32) COMMENT '间隔里程(由机油类型定时刷入)'")
    private String intervalMile;

    public String getIntervalMile() {
        return intervalMile;
    }

    public void setIntervalMile(String intervalMile) {
        this.intervalMile = intervalMile;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    //平均保养里程
    @Column(name = "avgby_mile", length = 32, columnDefinition = "VARCHAR(32) COMMENT '平均保养里程'")
    private String avgbyMile;

    //延保状态
    @Column(name = "yb_status", length = 1, columnDefinition = "VARCHAR(1) COMMENT '延保状态'")
    private String ybStatus;

    //延保类型
    @Column(name = "yb_type", length = 1, columnDefinition = "VARCHAR(1) COMMENT '延保类型'")
    private String ybType;

    //导入公司 ID
    @Column(name = "company_id", length = 32, columnDefinition = "VARCHAR(32) COMMENT '导入公司 ID'")
    private String companyId;

    //确认人
    @Column(name = "confirmer", length = 32, columnDefinition = "VARCHAR(32) COMMENT '确认人'")
    private String confirmer;

    //确认时间
    @Column(name = "confirm_date", length = 22, columnDefinition = "BIGINT COMMENT '确认时间'")
    private Long confirmDate;

    //状态
    @Column(name = "status", length = 1, columnDefinition = "VARCHAR(1) COMMENT '状态'")
    private String status;

    @Column(name = "real_amount", length = 32, columnDefinition = "VARCHAR(32) COMMENT '产值'")
    private String realAmount;

    @Column(name = "wx_type", length = 32, columnDefinition = "VARCHAR(32) COMMENT '维修类别'")
    private String wxType;

    @Column(name = "cost_type", length = 32, columnDefinition = "VARCHAR(32) COMMENT '消费类别'")
    private String costType;

    @ExcelData("进店名称")
    @Column(name = "organ_name", length = 32, columnDefinition = "VARCHAR(32) COMMENT '进店名称'")
    private String organName;

    @ExcelData("类型分组")
    @Column(name = "type_group", length = 32, columnDefinition = "VARCHAR(32) COMMENT '类型分组'")
    private String typeGroup;

    public String getTypeGroup() {
        return typeGroup;
    }

    public void setTypeGroup(String typeGroup) {
        this.typeGroup = typeGroup;
    }

    public String getOrganName() {
        return organName;
    }

    public void setOrganName(String organName) {
        this.organName = organName;
    }

    public String getCostType() {
        return costType;
    }

    public void setCostType(String costType) {
        this.costType = costType;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Long getOpenDate() {
        return openDate;
    }

    public void setOpenDate(Long openDate) {
        this.openDate = openDate;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getReceptor() {
        return receptor;
    }

    public void setReceptor(String receptor) {
        this.receptor = receptor;
    }

    public String getPlateNum() {
        return plateNum;
    }

    public void setPlateNum(String plateNum) {
        this.plateNum = plateNum;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getSeries() {
        return series;
    }

    public void setSeries(String series) {
        this.series = series;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getMaintainType() {
        return maintainType;
    }

    public void setMaintainType(String maintainType) {
        this.maintainType = maintainType;
    }

    public String getIsFinished() {
        return isFinished;
    }

    public void setIsFinished(String isFinished) {
        this.isFinished = isFinished;
    }

    public String getMaintainAmount() {
        return maintainAmount;
    }

    public void setMaintainAmount(String maintainAmount) {
        //数据去除","
        this.maintainAmount = maintainAmount == null ? "0" : maintainAmount.replaceAll(",", "");
    }

    public String getBalanceAmount() {
        return balanceAmount;
    }

    public void setBalanceAmount(String balanceAmount) {
        //金额去除0
        this.balanceAmount = balanceAmount == null ? "0" : balanceAmount.replaceAll(",", "");
    }

    public String getReceiveAmount() {
        return receiveAmount;
    }

    public void setReceiveAmount(String receiveAmount) {
        this.receiveAmount = receiveAmount == null ? "0" : receiveAmount.replaceAll(",", "");
    }

    public String getRunMile() {
        return runMile;
    }

    public void setRunMile(String runMile) {
        if (runMile != null) {
            runMile = runMile.replaceAll(",", "");
        }
        this.runMile = runMile;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public Long getExpectDate() {
        return expectDate;
    }

    public void setExpectDate(Long expectDate) {
        this.expectDate = expectDate;
    }

    public Long getFinishDate() {
        return finishDate;
    }

    public void setFinishDate(Long finishDate) {
        this.finishDate = finishDate;
    }

    public Long getBalanceDate() {
        return balanceDate;
    }

    public void setBalanceDate(Long balanceDate) {
        this.balanceDate = balanceDate;
    }

    public Long getClearDate() {
        return clearDate;
    }

    public void setClearDate(Long clearDate) {
        this.clearDate = clearDate;
    }

    public Long getSendCarDate() {
        return sendCarDate;
    }

    public void setSendCarDate(Long sendCarDate) {
        this.sendCarDate = sendCarDate;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getDemandNum() {
        return demandNum;
    }

    public void setDemandNum(String demandNum) {
        this.demandNum = demandNum;
    }

    public String getTestOperator() {
        return testOperator;
    }

    public void setTestOperator(String testOperator) {
        this.testOperator = testOperator;
    }

    public String getMaintaintypeId() {
        return maintaintypeId;
    }

    public void setMaintaintypeId(String maintaintypeId) {
        this.maintaintypeId = maintaintypeId;
    }

    public String getCarId() {
        return carId;
    }

    public void setCarId(String carId) {
        this.carId = carId;
    }

    public String getSaId() {
        return saId;
    }

    public void setSaId(String saId) {
        this.saId = saId;
    }

    public String getSaGroupId() {
        return saGroupId;
    }

    public void setSaGroupId(String saGroupId) {
        this.saGroupId = saGroupId;
    }

    public String getAvgMile() {
        return avgMile;
    }

    public void setAvgMile(String avgMile) {
        this.avgMile = avgMile;
    }

    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    public String getCarAge() {
        return carAge;
    }

    public void setCarAge(String carAge) {
        this.carAge = carAge;
    }

    public String getAvgbyMile() {
        return avgbyMile;
    }

    public void setAvgbyMile(String avgbyMile) {
        this.avgbyMile = avgbyMile;
    }

    public String getYbStatus() {
        return ybStatus;
    }

    public void setYbStatus(String ybStatus) {
        this.ybStatus = ybStatus;
    }

    public String getYbType() {
        return ybType;
    }

    public void setYbType(String ybType) {
        this.ybType = ybType;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getConfirmer() {
        return confirmer;
    }

    public void setConfirmer(String confirmer) {
        this.confirmer = confirmer;
    }

    public Long getConfirmDate() {
        return confirmDate;
    }

    public void setConfirmDate(Long confirmDate) {
        this.confirmDate = confirmDate;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRealAmount() {
        return realAmount;
    }

    public void setRealAmount(String realAmount) {
        this.realAmount = realAmount == null ? "0" : realAmount.replaceAll(",", "");
    }

    public String getWxType() {
        return wxType;
    }

    public void setWxType(String wxType) {
        this.wxType = wxType;
    }

    public String getSenderTel() {
        return senderTel;
    }

    public void setSenderTel(String senderTel) {
        this.senderTel = senderTel;
    }
}
